<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${ctg.name} - ${site.name}</title>
[#include "../include/head.html"/]
<script type="text/javascript">
$(function() {
	$("#guestbookForm").validate( {
		submitHandler : function(form) {
			$(form).ajaxSubmit( {
				"success" : function(data) {
					if(data.status==0) {
						alert("留言提交成功");
						location.href=location.href;
					} else if(data.status==1) {
						alert("验证码错误");
						$("#guestbookCaptcha").click();
					} else {
						alert("留言提交失败");
					}
				},
				"dataType" : "json"
			});
		}
	});
});
</script>
</head>

<body>
<div id="wrap">
	[#include "../include/navigate.html"/]
	<div id="content">
        <div id="left">
        	<p class="title"><span class="title_text">${ctg.name}</span></p>
            <p class="article_comment_title1"></p>
            <form id="guestbookForm" action="${base}/guestbook.jsp" method="post">
            <input type="hidden" name="ctgId" value="${ctg.id}"/>
      		<div class="public_comment1">
            	<div class="pc_left"></div>
                <div class="pc_content"><textarea name="content" class="pc_textarea required" maxlength="240" cols="60" rows="5"></textarea></div>
                <div class="pc_right"></div>
                <div class="clear"></div>
          		<div class="pc_btn">
                	<div class="pc_code"><p>验证码：<input type="text" name="captcha" id="captcha" class="w60 input_a required" vld="{required:true}" /></p>
                	<img id="checkCodeImg" src="${base}/captcha.svl" onclick="this.src='${base}/captcha.svl?d='+new Date()" title="看不清，换一张"/></div>
                	<button type="submit" class="btn_01">发表评论</button>
                </div>
            </div>
            </form>
            [@cms_guestbook_page ctgId=ctg.id siteId=site.id count='20']
            <p class="font14 gray6">已有 ${tag_pagination.totalCount}条简评【网友评论仅供其表达个人看法，并不表明本站同意其观点或证实其描述。】</p>
            <ul class="comment_list">
            	[#list tag_pagination.list as g]
                <li>
                	<div class="commenter">
                	[#if g.member??]
						<img src="/images/avatar/small/${g.member.id}.jpg" width="60" height="60" />
					[#else]
						<img src="/images/avatar/small/default.jpg" width="60" height="60" />
					[/#if]
                	</div>
                    <div class="comment_con">
                    	<p class="comment_text"><span class="orange">${(g.member.username)!'匿名网友'}：</span>${g.contentHtml!}</p>
                    	[#if g.reply??]
                        <div class="reference">
                    		<div class="reference_con">
                    			<p class="reference_text"><span class="orange">管理员回复：</span>${g.replyHtml!}</p>
                    		</div>
                   			<div class="clear"></div>
                        </div>
                        [/#if]
                        <p class="comment_timeOpration"><span class="floatLeft">${g.createTime?string('yyyy-MM-dd hh:mm:ss')}</span><span class="floatRight"></span></p>
                    </div>
                    <div class="clear"></div>
                </li>
                [/#list]
            </ul>
            <div class="pagination">[@cms_pagination sysPage='1'/]</div>
            [/@cms_guestbook_page]
        </div>
        <div id="right">
            <div class="boxB_bar"><span class="floatLeft">编辑推荐</span><a href="${base}/alone/boutique.jsp" class="more">更多>></a></div>
            <div class="boxB_con">
                [@cms_content_list recommend='1' count='12' titLen='10' descLen='20' append='...' orderBy='2']
            	[#list tag_list as a]
            	<p [#if a_index == 5 && a_has_next]class="recommend_list rl_line"[#else]class="recommend_list"[/#if]><span class="recommend_name">[<a href="${base}/space.jsp?u=${a.user.id}">${a.author}</a>]</span><a href="${a.url}" class="a_green2" title="${a.title}">${a.title}</a></p>
            	[/#list]
            	[/@cms_content_list]
            </div>
            <div class="bar_A"><p class="bar_A_title">精彩点评</p><a href="${base}/alone/boutiqueComment.jsp" target="_blank" class="bar_A_more">更多>></a></div>
            [@cms_comment_list count='6' recommend='1' textLen='50' append='...']
			<div class="wonderful_comments">
			[#list tag_list as c]
				<p class="wc_li">[@text_cut s=c.textHtml len=textLen append=append/]</p>
				<p class="wc_from"><span class="wcf_name">----[#if c.commentUser??]<a href="${base}/space.jsp?u=${c.commentUser.id}" class="a_green2">${c.commentUser.username}</a>[#else]匿名用户[/#if]</span>评论了<span class="wcf_for"><a href="${c.content.url}" target="_blank">《${c.content.title}》</a></span></p>
			[/#list]
			</div>
			[/@cms_comment_list]
			<div class="bar_B"><p class="bar_B_title">最近登陆用户</p></div>
            <ul class="active_author">
            [@cms_user_list orderBy='1' count='12']
            	[#list tag_list as u]
				<li><a href="${base}/space.jsp?u=${u.id}"><img src="/images/avatar/small/${u.id}.jpg" width="60" height="60" />${u.username}</a></li>
            	[/#list]
            [/@cms_user_list]
            </ul>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
	[#include "../include/foot.html"/]
</div>
</body>
</html>